import {
  PicCenterOutlined,
  FileImageOutlined,
  ContactsOutlined,
  AccountBookOutlined,
  BarsOutlined,
  PieChartOutlined,
  BarChartOutlined,
  LineChartOutlined,
  AreaChartOutlined,
  DollarOutlined,
  CiCircleOutlined,

} from '@ant-design/icons'
import Home from '../views/home/Index'
import { Index as Banner } from '../views/banner/Index'
import { List as BannerList } from '../views/banner/List'
import { ListDw } from '../views/banner/ListDw'
import { BuyList } from '../views/banner/BuyList'
import { GroceryList } from '../views/banner/GroceryList'
import { Add as BannerAdd } from '../views/banner/Add'
import { AddGL } from '../views/banner/AddGL'
import { AddBL } from '../views/banner/AddBL'
import { AddDw } from '../views/banner/AddDw'


import { AdminList } from '../views/user/AdminList'

import DataIndex from '../views/data/Index';
import ECharts from '../views/data/SalesVolume';
import Highcharts from '../views/data/ProfitLoss'
import Antv from '../views/data/Antv';

import Goods from "../views/goods";
import GoodSearch from "../views/goods/Search";

import { Index as User } from "../views/user/Index";
import { UserList } from "../views/user/UserList";


export interface IMenuProps {
  keyid: string,
  label: string,
  icon?: any,
  key: string,
  children?: IMenuProps[],
  element: React.ReactNode,
  index?: number,
  hidden?: boolean
}
// 在此处增加路由，需要先导入在views创建的相关文件
const menus: IMenuProps[] = [
  {
    keyid: '0-0',
    label: '系统首页',
    icon: <PicCenterOutlined />,
    key: '/', // 需要跳转的链接其实就是唯一表示
    element: <Home />,

  },
  {
    keyid: '0-1',
    label: '轮播图管理模块',
    icon: <FileImageOutlined />,
    key: '/banner',
    element: <Banner />,
    children: [
      {
        keyid: '0-1-0',
        index: 1,
        label: '首页顶部轮播图',
        icon: <FileImageOutlined />,
        key: '/banner/home',
        element: <BannerList />
      },
      {
        keyid: '0-1-1',
        label: '首页底部轮播图',
        icon: <FileImageOutlined />,
        key: '/banner/listdw',
        element: <ListDw />
      },
      {
        keyid: '0-1-2',
        label: '百货顶部轮播图',
        icon: <FileImageOutlined />,
        key: '/banner/gblist',
        element: <GroceryList />
      },
      {
        keyid: '0-1-3',
        index: 1,
        label: '添加轮播图',
        icon: <FileImageOutlined />,
        key: '/banner/add',
        element: <BannerAdd />,
        hidden: true
      },
      {
        keyid: '0-1-4',
        label: '添加商品轮播图',
        icon: <FileImageOutlined />,
        key: '/banner/addGL',
        element: <AddGL />,
        hidden: true

      },
      {
        keyid: '0-1-5',
        label: '添加底部轮播图',
        icon: <FileImageOutlined />,
        key: '/banner/addDw',
        element: <AddDw />,
        hidden: true

      }
    ]
  },
  {
    keyid: '0-2',
    label: '商品管理',
    icon: <AccountBookOutlined />,
    key: '/goods',
    element: <Goods />,
    children: [
      {
        keyid: '0-2-0',
        index: 1,
        label: '商品列表',
        icon: <BarsOutlined />,
        key: '/goods/search',
        element: <GoodSearch />
      }
    ]
  },
  {
    keyid: '0-3',
    label: '用户管理',
    icon: <DollarOutlined />,
    key: '/user',
    element: <User />,
    children: [
      {
        keyid: '0-3-0',
        label: '用户列表',
        index: 1,
        icon: <CiCircleOutlined />,
        key: '/user/userlist',
        element: <UserList />
      }
    ]
  },
  {
    keyid: '0-4',
    label: '数据可视化',
    icon: <PieChartOutlined />,
    key: '/data',
    element: <DataIndex />,
    children: [
      {
        keyid: '0-4-0',
        label: '销量分析',
        index: 1,
        icon: <AreaChartOutlined />,
        key: '/data/echarts',
        element: <ECharts />,
      },
      {
        keyid: '0-4-1',
        label: '系列竞比',
        icon: <LineChartOutlined />,
        key: '/data/highcharts',
        element: <Highcharts />,
      },
      {
        keyid: '0-4-2',
        label: '原料库存',
        icon: <BarChartOutlined />,
        key: '/data/antv',
        element: <Antv />,
      }
    ]
  },
  {
    keyid: '0-5',
    label: '管理员列表',
    icon: <ContactsOutlined />,
    key: '/adminList',
    element: <AdminList />
  }
]

export default menus